-- GENERATED SPELL FOR [Margol the Rager] --


function spell0_5833(pUnit, Event) --@Chained Bolt,n/a--
pUnit:FullCastSpellOnTarget(15549,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5833', 1800, 1)
end

function spell1_5833(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(8147,pUnit)
pUnit:RegisterEvent('Sorts_5833', 10272, 1)
end

function Sorts_5833(pUnit, Event)
local choix_sorts_5833 = math.random(0, 1)
if choix_sorts_5833 == 0 then
pUnit:RegisterEvent('spell0_5833', 1, 1)
end
if choix_sorts_5833 == 1 then
pUnit:RegisterEvent('spell1_5833', 1, 1)
end
end

function mob5833_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5833', math.random(1500, 3000), 1)
end

function mob5833_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5833_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5833_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5833, 1, 'mob5833_Action')
RegisterUnitEvent(5833, 2, 'mob5833_Leave')
RegisterUnitEvent(5833, 3, 'mob5833_Kill')
RegisterUnitEvent(5833, 4, 'mob5833_Die')
